#include<bits/stdc++.h>
#define ll long long
#define mid ((l+r)>>1)
#define rep(x,y,z) for(int x=(y);x<=(z);x++)
#define per(x,y,z) for(int x=(y);x>=(z);x--)
#define repn(x) rep(x,1,n)
#define repm(x) rep(x,1,m)
#define pb push_back
#define e(x) for(int i=h[x],y=to[i];i;i=nxt[i],y=to[i])
#define E(x) for(auto y:p[x])
#define Pi pair<int,int>
#define ui unsigned ll
inline int read(){int s=0,w=1;char c=getchar();while(c<48||c>57) {if(c=='-') w=-1;c=getchar();}while(c>=48&&c<=57)s=(s<<1)+(s<<3)+c-48,c=getchar();return s*w;}
inline void pf(ll x){if(x<0) putchar('-'),x=-x;if(x>9)pf(x/10);putchar(x%10+48);}
using namespace std;
const int N=1e6+5,M=1e7+5,inf=(1LL<<29)-1;
const ll llf=1e18;
string s;
int a[M],n,k,m,cl,cr;
ll ql,qr;
#include<bits/extc++.h>
using namespace __gnu_pbds;
gp_hash_table<ll,int>P,Q;
const int base1=13331,base2=131;
const int mod1=1e9+9,mod2=998244853;
int p1[M],H1[M],p2[M],H2[M];
inline int getH1(int l,int r){
	return (H1[r]-(ll)H1[l-1]*p1[r-l+1]%mod1+mod1)%mod1;
}
inline int getH2(int l,int r){
	return (H2[r]-(ll)H2[l-1]*p2[r-l+1]%mod2+mod2)%mod2;
}
inline ll calc(int a,int b){
	return (ll)a*mod2+b;
}
inline ll getH(int l,int r){
	return (ll)getH1(l,r)*mod2+getH2(l,r);
}
inline void Main(){
	n=read(),k=read(),cin>>ql>>qr;
	cin>>s,s='#'+s,p1[0]=p2[0]=1;
	repn(i)a[i]=s[i]-'a'+1,p1[i]=(ll)p1[i-1]*base1%mod1,p2[i]=(ll)p2[i-1]*base2%mod2,H1[i]=((ll)H1[i-1]*base1+a[i])%mod1,H2[i]=((ll)H2[i-1]*base2+a[i])%mod2;
	rep(i,k+1,n)P[getH(i-k,i)]++;
	m=n;
	while(1){
		ll H=getH(m-k+1,m);
		if(Q[H]){
			cl=Q[H],cr=m-k;
			break;
		}
		Q[H]=m-k+1;
		int ans=1,Mx=0,Ha1=getH1(m-k+1,m),Ha2=getH2(m-k+1,m);
		per(i,26,1){
			int W=P[calc(((ll)Ha1*base1+i)%mod1,((ll)Ha2*base2+i)%mod2)];
			if(W>=Mx)Mx=W,ans=i;
		}
		a[++m]=ans,H1[m]=((ll)H1[m-1]*base1+a[m])%mod1,H2[m]=((ll)H2[m-1]*base2+a[m])%mod2;
		P[getH(m-k,m)]++,p1[m]=(ll)p1[m-1]*base1%mod1,p2[m]=(ll)p2[m-1]*base2%mod2;
	}
	int len=cr-cl+1;
	for(ll i=ql;i<=qr;i++){
		if(i<=m)putchar('a'+a[i]-1);
		else {
			ll id=i-cl+1;
			putchar('a'+a[cl+(id-1)%len]-1);
		}
	}
	puts("");
}
signed main(){
	freopen("string.in","r",stdin);
	freopen("string.out","w",stdout);
	int T=1;
	while(T--)Main();
	return 0;
}